<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php echo "<?php\n"; ?>
/* @var $this <?php echo $this->getControllerClass(); ?> */
/* @var $dataProvider CActiveDataProvider */

<?php
$label=$this->pluralize($this->class2name($this->modelClass));
echo "\$this->breadcrumbs=array(
	'$label',
);\n";
?>
?>

<h1><?php echo $label; ?></h1>
<?php echo '<?php $this->widget(\'WLinkPager\', array(
	\'pages\' => $pages,
));?>';?>

<table class="table table-striped table-bordered">
	<tr>
		<th>Название</th>
		<th class="action_column">&nbsp;</th>
	</tr>
	<?php echo '<?php foreach ($models as $item):?>';?>
		
		<tr>
			<td>
				<?php echo '<?php echo CHtml::link(CHtml::encode($item->name), array(\'update\', \'id\'=>$item->id)); ?>';?>

			</td>
			<td>
				<?php echo '<?php echo CHtml::link(\'Изменить\', array(\'update\', \'id\'=>$item->id)); ?>';?>
				/
				<?php echo '<?php echo CHtml::link(\'Удалить\', array(\'delete\', \'id\'=>$item->id), array(
					\'onclick\' => \'return confirm("Вы уверены, что хотите удалить элемент?")\'
				)); ?>';?>

			</td>
		</tr>
	<?php echo '<?php endforeach;?>';?>

</table>

<?php echo '<?php $this->widget(\'WLinkPager\', array(
	\'pages\' => $pages,
));?>';?>
